const { Sequelize, DataTypes, Model } = require('sequelize');
const { sequelize } = require('../db');

class MailCheck extends Model {

}

MailCheck.init({
    email: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: '邮箱地址',
    },
    code: {
        type: DataTypes.STRING(8),
        allowNull: false,
        comment: "验证码"
    }
}, {
    sequelize,
    modelName: 'MailCheck',
    comment: '邮箱验证码时效性'
})

module.exports = MailCheck